package com.qd.common.panda.domain.entity.carpark;

import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import com.cdqidi.valid.group.DeleteGroup;
import com.cdqidi.valid.group.UpdateGroup;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

/**
 * 油号价格
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
@ToString
public class CarParkGasStationPriceDTO extends BaseQuery {

    /**
     * 主键
     */
    @NotBlank(message = "主键不能为空", groups = {DeleteGroup.class, UpdateGroup.class})
    @Size(max = 50, message = "主键长度不能超过{max}位", groups = {DeleteGroup.class, UpdateGroup.class})
    private String id;
    /**
     * 油号
     */
    @NotNull(message = "油号不能为空", groups = DefaultGroup.class)
    private Integer octaneNumber;
    /**
     * 价格
     */
    @NotNull(message = "价格不能为空", groups = DefaultGroup.class)
    private BigDecimal price;
    /**
     * 价格显示
     */
    private String priceDisplay;
    /**
     * 折扣
     */
    private Double customerDiscount;
    /**
     * 停车场标识
     */
    @NotBlank(message = "停车场标识不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "停车场标识长度不能超过{max}位", groups = DefaultGroup.class)
    private String pId;
    /**
     * 优惠价
     */
    private BigDecimal customerPrice;
    /**
     * 优惠价显示
     */
    private String customerPriceDisplay;
    /**
     * 油站价格
     */
    private BigDecimal stationPrice;
    /**
     * 油站价格显示
     */
    private String stationPriceDisplay;
    /**
     * 枪号,用逗号隔开
     */
    @Size(max = 200, message = "枪号,用逗号隔开长度不能超过{max}位", groups = DefaultGroup.class)
    private String nozzleNumbers;
    @Override
    public void freeData() {
        this.id = null;
        this.octaneNumber = null;
        this.price = null;
        this.priceDisplay = null;
        this.customerDiscount = null;
        this.pId = null;
        this.customerPrice = null;
        this.customerPriceDisplay = null;
        this.stationPrice = null;
        this.stationPriceDisplay = null;
        this.nozzleNumbers = null;
        super.freeData();
    }
}
